package com.edfu.core.coursemgt.persistence.api;

import java.util.List;

import com.edfu.core.coursemgt.persistence.entity.CourseOfferingEntity;
import com.edfu.core.coursemgt.persistence.entity.CourseOfferingInstanceEntity;
import com.edfu.core.coursemgt.persistence.entity.ICourseMgtEntity;
import com.edfu.core.coursemgt.persistence.entity.LessonEntity;
import com.edfu.core.coursemgt.persistence.entity.LessonUnitEntity;

public interface ICourseOfferingMgtPersistence {
	
	CourseOfferingEntity getCourseOffering(String courseOfferingCode);

	List<CourseOfferingEntity> getPublicallyAvailableCourseOfferings();

	LessonEntity getLesson(String courseOfferingCode, String lessonName);

	List<LessonEntity> getLessons(String courseOfferingCode);

	LessonUnitEntity getLessonUnit(String courseOfferingCode,
			String lessonName, String lessonUnitName);

	List<LessonUnitEntity> getLessonUnits(String courseOfferingCode,
			String lessonName);

	List<CourseOfferingEntity> getCourseOfferingsByAuthor(String authorId);
	
	List<CourseOfferingInstanceEntity> getEnrolledCourseOfferings(String studentId);

	void persist(ICourseMgtEntity entity);

	ICourseMgtEntity merge(ICourseMgtEntity entity);

	void remove(ICourseMgtEntity entity);
	
	CourseOfferingInstanceEntity getCourseOfferingInstance(String courseOfferingCode);

}
